<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
	<title>铁水联运信息核查系统--注册</title>
    <link rel="shortcut icon" href="${mainDomain}/statics/images/favicon.ico">
    <link rel="stylesheet" href="${mainDomain}/statics/css/front/amazeui.min.css"/>
    <link rel="stylesheet" href="${mainDomain}/statics/css/front/goodsstyle.css">
    <link rel="stylesheet" href="${mainDomain}/statics/css/front/custom.css">
    <script type="text/javascript">
        var mainDomain = "${mainDomain}";
		var miscDomain = '${mainDomain}';
    </script>
    <style>
    .header {
      text-align: center;
    }
    .header h1 {
      font-size: 200%;
      color: #333;
      margin-top: 30px;
    }
    .header p {
      font-size: 14px;
    }
    .item {
    	margin: 30px 0; 
    }
    .form {
    	text-align: center;
    }
    </style>
</head>
<body style="background:url(${mainDomain}/statics/images/ts-bg.jpg) no-repeat center top">
<!-- 头部导航 begin -->
<div id="logo"></div>
<!-- 头部导航 end -->
<div class="header" style="min-width:1349px;">
  <div class="am-g">
    
  </div>
  <div class="header">
  <div class="am-g" style="min-width: 1000px;">
    <div class="am-u-sm-5 logo" style="padding:0px;">    		
      		<!--<a href="/index"><img src="${mainDomain}/statics/images/x_logo.png"/></a>-->
      	</div>	
  </div>

</div>

<div  class="am-container"style="">
  <div class="am-u-lg-6 am-u-md-8 am-u-sm-centered" style="width:720px;margin:auto;">
   <h1 style="text-align: center; color:#00688B; font-family: '微软简中国'; font-size:24px; margin-top: 10px;">欢迎注册</h1>
   <div style="margin:10px 0;">
     <img src="${mainDomain}/statics/images/goods/rg3.png">
   </div>
      <form id="my-form" class="am-form" action="javascript:;" method="post" data-am-validator>
      		<input type="hidden" id="yhid" name="yhid" value="${userid}"/>
       		<input type="hidden" id="yyzzfilename" name="yyzzfilename" />
        	<input type="hidden" id="zzjgfilename" name="zzjgfilename" />
        	<input type="hidden" id="swdjfilename" name="swdjfilename" />
        	<input type="hidden" id="qyzzfilename" name="qyzzfilename" />
        	<input type="hidden" id="wtzmfilename" name="wtzmfilename" />
        	<input type="hidden" id="szhyfilename" name="szhyfilename" />
        	<table style="margin:auto;border-collapse:separate;border-spacing:15px;">
        	 <tr id="trlx">
        	    <td style="color:#00688B;text-align:right;">证件类型：</td>
        	    <td colspan>
                    <select id="zjlx" name="zjlx" style="width:200px;border-radius:10px;height:35px;font-size:14px;">
			        	<option value="0">三证合一</option>
			        	<option value="1">老三证</option>
			        </select>
			     </td>
        	 </tr>
        	 <tr id="szhydiv">
        	    <td style="color:#00688B;text-align:right;">上传企业三证合一：</td>
        	    <td>
                    <div class="am-form-file"  style="width:100%">
					  <button type="button" class="am-btn am-btn-danger am-btn-sm">
						<i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
					  <input id="szhyfile" name="szhyfile" type="file" >
					</div>
			     </td>
			     <td><input type="button" class="am-btn am-btn-primary am-btn-xs" value="上传" onclick="return ajaxszhyUpload();"></td>
			     <td><div id="szhy-list"></div></td>
        	    <td><div id="szhy_tips" style="color:red;font-size:14px;">＊ </div></td>
        	 </tr>
        	 <tr id="yyzzdiv">
        	    <td style="color:#00688B;text-align:right;">上传企业营业执照：</td>
        	    <td>
                    <div class="am-form-file"  style="width:100%">
					  <button type="button" class="am-btn am-btn-danger am-btn-sm">
						<i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
					  <input id="yyzzfile" name="yyzzfile" type="file" >
					</div>
			     </td>
			     <td><input type="button" class="am-btn am-btn-primary am-btn-xs" value="上传" onclick="return ajaxyyzzUpload();"></td>
			     <td><div id="yyzzfile-list"></div></td>
        	    <td><div id="yyzzfile_tips" style="color:red;font-size:14px;">＊ </div></td>
        	 </tr>
        	 <tr id="zzjgdiv">
        	    <td style="color:#00688B;text-align:right;">上传企业组织机构代码证：</td>
        	    <td>
					<div class="am-form-file"  style="width:100%">
					  <button type="button" class="am-btn am-btn-danger am-btn-sm">
						<i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
					  <input id="zzjgfile" name="zzjgfile" type="file" >
					</div>                
				</td>
				<td><input type="button" class="am-btn am-btn-primary am-btn-xs" value="上传" onclick="return ajaxzzjgUpload();"></td>
				<td><div id="zzjgfile-list"></div></td>
        	    <td><div id="zzjgfile_tips" style="color:red;font-size:14px;">＊ </div></td>
        	 </tr>
        	 <tr id="swdjdiv">
        	    <td style="color:#00688B;text-align:right;">上传企业税务登记证：</td>
        	    <td><div class="am-form-file"  style="width:100%">
					  <button type="button" class="am-btn am-btn-danger am-btn-sm">
						<i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
					  <input id="swdjfile" name="swdjfile" type="file" >
					</div>
				</td>
				<td><input type="button" class="am-btn am-btn-primary am-btn-xs" value="上传" onclick="return ajaxswdjUpload();"></td>
				<td><div id="swdjfile-list"></div></td>
        	    <td><div id="swdjfile_tips" style="color:red;font-size:14px;">＊ </div></td>
        	 </tr>
        	 <tr id="qyzzdiv">
        	    <td style="color:#00688B;text-align:right;">上传企业资质：</td>
        	    <td><div class="am-form-file"  style="width:100%">
					  <button type="button" class="am-btn am-btn-danger am-btn-sm">
						<i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
					  <input id="qyzzfile" name="qyzzfile" type="file">
					</div>
				</td>
				<td><input type="button" class="am-btn am-btn-primary am-btn-xs" value="上传" onclick="return ajaxqyzzUpload();"></td>
				<td><div id="qyzzfile-list"></div></td>
        	    <td></td>
        	 </tr>
        	 <tr id="wtzmdiv">
        	    <td style="color:#00688B;text-align:right;">上传企业注册委托证明：</td>
        	    <td><div class="am-form-file"  style="width:100%">
					  <button type="button" class="am-btn am-btn-danger am-btn-sm">
						<i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
					  <input id="wtzmfile" name="wtzmfile" type="file">
					</div>
				</td>
				<td><input type="button" class="am-btn am-btn-primary am-btn-xs" value="上传" onclick="return ajaxwtzmUpload();"></td>
				<td><div id="wtzmfile-list"></div></td>
        	    <td><div id="wtzmfile_tips" style="color:red;font-size:14px;">＊ </div></td>
        	 </tr>
        	 <tr><td colspan="5" style="text-align:center;color:red">注:企业注册委托证明可以为企业授权证明</td></tr>
        	 <tr >
			         <td colspan="5" style="text-align:center;"><button type="submit" id="saveButton" class="am-btn am-btn-primary am-btn-xs" style="width:200px;height30px;font-size:16px;">确认提交&nbsp;|&nbsp;下一步</button></td>
			         
			     </tr>
            </table>
        </form>
	<hr/>		
    </div>    
</div>
	
    <br>
    <footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{  }" style="min-width: 1349px;">
        <!--<div class="am-footer-switch" style="font-weight:normal;">
            <span class="am-footer-ysp" data-rel="mobile"
                  data-am-modal="{target: '#am-switch-mode'}">
                  武汉航运交易所
            </span>
              <span class="am-footer-divider"> | </span>
              <a id="godesktop" data-rel="desktop" class="am-footer-desktop" href="javascript:">
                  法律申明
              </a>
              <span class="am-footer-divider"> | </span>
              <span class=""> 鄂ICP备16003518 </span>
        </div>
        <div class="am-footer-miscs ">
            <p>版权所有：武汉航运交易所</p>
            <p>地址：武汉市江岸区金桥大道117号市民之家3楼F区</p>
            <p>电话：027-65771553</p>
        </div>-->
  </footer>
    <script type="text/javascript" src="${mainDomain}/statics/js/front/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="${mainDomain}/statics/js/front/amazeui.min.js"></script>
	<script type="text/javascript" src="${mainDomain}/statics/js/front/ajaxfileupload.js"></script>	
	<script>	
	$('#my-form').validator(
    {
        validate: function (validity) {
        	if ($(validity.field).is('#szhyfile')) {
        		var szhyfilename=$("#szhyfilename");
              	if($.trim(szhyfilename.val())==''){
                     validity.valid = false;
            		 $('#szhy_tips').html("三证合一必填");
               	}
            	else
			    {
			    	validity.valid = true;
                    $('#szhy_tips').html("");
			    }
        	}
            if ($(validity.field).is('#yyzzfile')) {
            	var yyzzfilename=$("#yyzzfilename");
              	if($.trim(yyzzfilename.val())==''){
            		validity.valid = false;
            		$('#yyzzfile_tips').html("营业执照必填");
            	}
            	else
			    {
			    	validity.valid = true;
                    $('#yyzzfile_tips').html("");
			    }
        	}
        	if ($(validity.field).is('#zzjgfile')) {
        		var zzjgfilename=$("#zzjgfilename");
              	if($.trim(zzjgfilename.val())==''){
            		validity.valid = false;
            		$('#zzjgfile_tips').html("组织结构代码证必填");
            	}
            	else
			    {
			    	validity.valid = true;
                    $('#zzjgfile_tips').html("");
			    }
        	}
        	if ($(validity.field).is('#swdjfile')) {
        		var swdjfilename=$("#swdjfilename");
              	if($.trim(swdjfilename.val())==''){
            		validity.valid = false;
            		$('#swdjfile_tips').html("税务登记证必填");
            	}
            	else
			    {
			    	validity.valid = true;
                    $('#swdjfile_tips').html("");
			    }
        	}
        	if ($(validity.field).is('#wtzmfile')) {
        		var wtzmfilename=$("#wtzmfilename");
              	if($.trim(wtzmfilename.val())==''){
            		validity.valid = false;
            		$('#wtzmfile_tips').html("委托证明必填");
            	}
            	else
			    {
			    	validity.valid = true;
                    $('#wtzmfile_tips').html("");
			    }
        	}
        },
        
        submit: function() {
        	if(this.isFormValid()){
        	
        	var userid = $("#yhid").val();
        	$.ajax( {  
	        type : 'POST',  
	        url : '/login/register/three?userid='+userid,  
	        data : $('#my-form').serialize(),  
	        success : function(data) {  
	        	var msg = data.message;
	        	if(msg==1)
        		{
	        		alert('保存成功');
	        		window.location.href="/login/registerend";	        		
        		}
	        	if(msg==-1)
        		{
	        		alert('该用户此步骤已经注册过，请进行其他操作!');	
        		}
	        },  
	        error : function(data) {  
	          alert("保存失败")  
	        }  
	      });
        }
        }
    })
	</script>
   <script type="text/javascript" src="${mainDomain}/statics/js/front/registerthree.js" charset="UTF-8"></script>
</body>
</html>